/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.wx.entity;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * wx_activityEntity
 * @author wangjianxin
 * @version 2018-09-28
 */
@Table(name="wx_activity", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="活动名称", queryType=QueryType.LIKE),
		@Column(name="title", attrName="title", label="活动标题", queryType=QueryType.LIKE),
		@Column(name="begin_time", attrName="beginTime", label="begin_time"),
		@Column(name="end_time", attrName="endTime", label="end_time"),
		@Column(name="after_end_time", attrName="afterEndTime", label="核销结束时间"),
		@Column(name="after_begin_time", attrName="afterBeginTime", label="核销开始时间"),
		@Column(name="phone", attrName="phone", label="客服电话"),
		@Column(name="rule", attrName="rule", label="rule"),
		@Column(name="num", attrName="num", label="参与人数"),
		@Column(name="real_num", attrName="realNum", label="真实参与人数"),
		@Column(name="one_time", attrName="oneTime", label="每人限购一次，0默认关闭，1开启"),
		@Column(name="price", attrName="price", label="price"),
		@Column(name="group_pic", attrName="groupPic", label="group_pic"),
		@Column(includeEntity=DataEntity.class),
		@Column(name="business", attrName="business", label="选择商家"),
		@Column(name="business_apply", attrName="businessApply", label="主推商家"),

		@Column(name="share_title", attrName="shareTitle", label="主推商家"),
		@Column(name="share_pic", attrName="sharePic", label="主推商家"),
		@Column(name="share_content", attrName="shareContent", label="主推商家"),
		@Column(name="theme", attrName="theme", label="活动主题"),
		@Column(name="banner_pic", attrName="bannerPic", label="海报banne图"),
		@Column(name="dis_value", attrName="disValue", label="活动返佣金"),
		@Column(name="bgm", attrName="bgm", label="背景音乐"),
		@Column(name="invite_banner_pic", attrName="inviteBannerPic", label="我的邀请背景图"),
		@Column(name="qr_index", attrName="qrIndex", label="二维码位置"),
		@Column(name="head_img_index", attrName="headImgIndex", label="头像自定义位置"),
		@Column(name="user_name_index", attrName="userNameIndex", label="昵称自定义位置"),
		@Column(name="refresh_invite_img", attrName="refreshInviteImg", label="昵称自定义位置"),
		@Column(name="business_group_id", attrName="businessGroupId", label="活动选择的商家分组id"),
		@Column(name="office_code", attrName="officeCode", label="机构code码")
}, orderBy="a.update_date DESC"
)
public class WxActivity extends DataEntity<WxActivity> {
	
	private static final long serialVersionUID = 1L;
	/**
	 * 活动的名称（暂时未用）
	 */
	private String name;
	/**
	 * 活动的标题
	 */
	private String title;
	/**
	 * 活动开始时间
	 */
	private Date beginTime;
	/**
	 * 活动结束时间
	 */
	private Date endTime;
	/**
	 * 核销开始时间
	 */
	private Date afterBeginTime;
	/**
	 * 活动结束时间
	 */
	private Date afterEndTime;
	/**
	 * 客户电话
	 */
	private String phone;
	/**
	 * 活动规则
	 */
	private String rule;
	/**
	 * 参与人数,假人数
	 */
	private Long num;
	/**
	 * 真实参与人数
	 */
	private Long realNum;
	/**
	 *  每人限购一次，0默认关闭，1开启
	 */
	private Long oneTime;
	/**
	 * 活动几个
	 */
	private String price;
	/**
	 * 入群二维码图片
	 */
	private String groupPic;
	/**
	 * 选择的活动商家
	 */
	private String business;
	/**
	 * 主推商家，在会员卡那显示
	 */
	private String businessApply;
	/**
	 * 下面三个都是分享的配置
	 */
	private String shareTitle;
	private String sharePic;
	private String shareContent;
	/**
	 * 自定义二维码坐标位置
	 */
	private String qrIndex;
	private String headImgIndex;
	private String userNameIndex;
	/**
	 * 0代表默认流程，1代表重新刷新用户分销图片
	 */
	private Integer refreshInviteImg;
	/**
	 * 活动的返佣金额
	 */
	private String disValue;
	/**
	 * 背景音乐
	 */
	private String bgm;
	/**
	 * 邀请海报
	 */
	private String inviteBannerPic;
	/**
	 * 活动的主题
	 */
	private Integer theme;
	/**
	 * 活动的banner首页大图
	 */
	private String bannerPic;
	/**
	 * 活动的h5链接
	 */
	private String activityH5Url;
	/**
	 * 活动选择的商家分组id
	 */
	private Long businessGroupId;

	/**
	 * 机构code码
	 */
	private String officeCode;


	/********************************** 添加字段 **********************************/

	/**
	 * 活动的支出和收入
	 */
	private BigDecimal amountOut;

	private BigDecimal amountIn;

	private List<WxBusinessGroupOrgConfig> wxBusinessGroupOrgConfigList;

	private List<String> bus;
	
	public WxActivity() {
		this(null);
	}

	public WxActivity(String id){
		super(id);
	}
	
	@Length(min=0, max=200, message="活动名称长度不能超过 200 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="活动标题不能为空")
	@Length(min=0, max=200, message="活动标题长度不能超过 200 个字符")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="begin_time不能为空")
	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="end_time不能为空")
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@Length(min=0, max=200, message="客服电话长度不能超过 200 个字符")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	@Length(min=0, max=4096, message="rule长度不能超过 4096 个字符")
	public String getRule() {
		return rule;
	}

	public void setRule(String rule) {
		this.rule = rule;
	}
	
	public Long getNum() {
		return num;
	}

	public void setNum(Long num) {
		this.num = num;
	}
	
	public Long getOneTime() {
		return oneTime;
	}

	public void setOneTime(Long oneTime) {
		this.oneTime = oneTime;
	}
	
	@Length(min=0, max=200, message="price长度不能超过 200 个字符")
	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}
	
	@Length(min=0, max=500, message="group_pic长度不能超过 500 个字符")
	public String getGroupPic() {
		return groupPic;
	}

	public void setGroupPic(String groupPic) {
		this.groupPic = groupPic;
	}
	
	public String getBusiness() {
		return business;
	}

	public void setBusiness(String business) {
		this.business = business;
	}
	
	public String getBusinessApply() {
		return businessApply;
	}

	public void setBusinessApply(String businessApply) {
		this.businessApply = businessApply;
	}

	public List<String> getBus() {
		return bus;
	}

	public void setBus(List<String> bus) {
		this.bus = bus;
	}

	public String getShareTitle() {
		return shareTitle;
	}

	public void setShareTitle(String shareTitle) {
		this.shareTitle = shareTitle;
	}

	public String getSharePic() {
		return sharePic;
	}

	public void setSharePic(String sharePic) {
		this.sharePic = sharePic;
	}

	public String getShareContent() {
		return shareContent;
	}

	public void setShareContent(String shareContent) {
		this.shareContent = shareContent;
	}

	public String getActivityH5Url() {
		return activityH5Url;
	}

	public void setActivityH5Url(String activityH5Url) {
		this.activityH5Url = activityH5Url;
	}

	public Integer getTheme() {
		return theme;
	}

	public void setTheme(Integer theme) {
		this.theme = theme;
	}

	public String getBannerPic() {
		return bannerPic;
	}

	public void setBannerPic(String bannerPic) {
		this.bannerPic = bannerPic;
	}

	public String getDisValue() {
		return disValue;
	}

	public void setDisValue(String disValue) {
		this.disValue = disValue;
	}

	public String getBgm() {
		return bgm;
	}

	public void setBgm(String bgm) {
		this.bgm = bgm;
	}

	public String getInviteBannerPic() {
		return inviteBannerPic;
	}

	public void setInviteBannerPic(String inviteBannerPic) {
		this.inviteBannerPic = inviteBannerPic;
	}

	public BigDecimal getAmountOut() {
		return amountOut;
	}

	public void setAmountOut(BigDecimal amountOut) {
		this.amountOut = amountOut;
	}

	public BigDecimal getAmountIn() {
		return amountIn;
	}

	public void setAmountIn(BigDecimal amountIn) {
		this.amountIn = amountIn;
	}

	public String getQrIndex() {
		return qrIndex;
	}

	public void setQrIndex(String qrIndex) {
		this.qrIndex = qrIndex;
	}

	public String getHeadImgIndex() {
		return headImgIndex;
	}

	public void setHeadImgIndex(String headImgIndex) {
		this.headImgIndex = headImgIndex;
	}

	public String getUserNameIndex() {
		return userNameIndex;
	}

	public void setUserNameIndex(String userNameIndex) {
		this.userNameIndex = userNameIndex;
	}

	public Integer getRefreshInviteImg() {
		return refreshInviteImg;
	}

	public void setRefreshInviteImg(Integer refreshInviteImg) {
		this.refreshInviteImg = refreshInviteImg;
	}

	public Date getAfterEndTime() {
		return afterEndTime;
	}

	public void setAfterEndTime(Date afterEndTime) {
		this.afterEndTime = afterEndTime;
	}

	public Date getAfterBeginTime() {
		return afterBeginTime;
	}

	public void setAfterBeginTime(Date afterBeginTime) {
		this.afterBeginTime = afterBeginTime;
	}

	public Long getRealNum() {
		return realNum;
	}

	public void setRealNum(Long realNum) {
		this.realNum = realNum;
	}

	public Long getBusinessGroupId() {
		return businessGroupId;
	}

	public void setBusinessGroupId(Long businessGroupId) {
		this.businessGroupId = businessGroupId;
	}

	public List<WxBusinessGroupOrgConfig> getWxBusinessGroupOrgConfigList() {
		return wxBusinessGroupOrgConfigList;
	}

	public void setWxBusinessGroupOrgConfigList(List<WxBusinessGroupOrgConfig> wxBusinessGroupOrgConfigList) {
		this.wxBusinessGroupOrgConfigList = wxBusinessGroupOrgConfigList;
	}

	public String getOfficeCode() {
		return officeCode;
	}

	public void setOfficeCode(String officeCode) {
		this.officeCode = officeCode;
	}
}